package org.misalen.web.service.sms.info;

public enum AliInfoType {
	userRegisteredCode("sms.ali.userRegisteredCode", "userRegistered"), //
	userFindPwdCode("sms.ali.userFindPwdCode", "userFindPwd"),
	userWithDrawCode("sms.ali.userWithDrawCode", "userWithDraw"),
	ownerRegisteredCode("sms.ali.ownerRegisteredCode", "ownerRegistered"), //
	ownerFindPwdCode("sms.ali.ownerFindPwdCode", "ownerFindPwd"),
	driverRegisteredCode("sms.ali.driverRegisteredCode", "driverRegistered"), //
	driverFindPwdCode("sms.ali.driverFindPwdCode", "driverFindPwd"),
	driverWithDrawCode("sms.ali.driverWithDrawCode", "driverdriverWithDraw");
	public String templateId;
	public String type;

	AliInfoType(String templateId, String type) {
		this.templateId = templateId;
		this.type = type;
	}

	public static AliInfoType byType(String type) {
		for (AliInfoType infoType : AliInfoType.values()) {
			if (type.equals(infoType.type)) {
				return infoType;
			}
		}
		return null;
	}
}
